﻿using System.Collections.Generic;
using Moq;
using Validity.Contexts;
using Validity.Rules;

namespace Validity.Test.Contexts
{
  public class MockValidationContext<T>
      : ValidationContext<ObjectStub, T>
  {
    private readonly Mock<IList<IRule<ObjectStub, T>>> _rules;

    protected override IList<IRule<ObjectStub, T>> Rules { get { return _rules.Object; } }
    public Mock<IList<IRule<ObjectStub, T>>> RulesMock { get { return _rules; } }

    public MockValidationContext()
    {
      _rules = new Mock<IList<IRule<ObjectStub, T>>>(MockBehavior.Strict);
    }
  }
}
